package com.quasar.hpatient.model.medicalmodel;

import java.io.Serializable;
import java.util.List;

/**
 * 获取单日药单信息
 * Created by Administrator on 2017/8/10 0010.
 */

public class PrescriptionDayData implements Serializable {


    /**
     * msgCode : 0x00000000
     * list : [{"perscriptDetailList":[{"plId":21,"prescriptionEditHistoryList":[],"typeName":"","mid":14,"useTypeId":"1","packages":"","periodBegin":"2017-12-04 14:00:24","prescriptionDoseDetail":[{"plId":104,"detailId":1,"useTime":"1970-01-01 00:00:00","id":192,"useCount":1},{"plId":104,"detailId":2,"useTime":"1970-01-01 00:00:00","id":193,"useCount":1}],"userPeriodId":1,"useInterval":1,"dose":"","doseName":"100mg/10ml","prescriptionIndex":{"doctorId":0,"patientId":5,"editType":2,"editTime":"2017-12-06 15:26:36","id":21},"rName":"","name":"","typeId":0,"id":104,"mName":"利妥昔单抗（美罗华）","useDesc":"","periodEnd":"2017-12-05 00:00:00"},{"plId":21,"prescriptionEditHistoryList":[],"typeName":"","mid":26,"useTypeId":"1","packages":"瓶","periodBegin":"2017-12-06 00:00:00","prescriptionDoseDetail":[{"plId":107,"detailId":1,"useTime":"1970-01-01 09:00:00","id":198,"useCount":1},{"plId":107,"detailId":2,"useTime":"1970-01-01 12:00:00","id":199,"useCount":1}],"userPeriodId":1,"useInterval":1,"dose":"","doseName":"0.4g/瓶","prescriptionIndex":{"doctorId":0,"patientId":5,"editType":2,"editTime":"2017-12-06 15:26:36","id":21},"rName":"","name":"","typeId":0,"id":107,"mName":"盐酸莫西沙星注射液 （拜复乐）","useDesc":"","periodEnd":"2017-12-07 06:03:47"},{"plId":21,"prescriptionEditHistoryList":[],"typeName":"","mid":1,"useTypeId":"1","packages":"粒","periodBegin":"2017-12-04 14:01:10","prescriptionDoseDetail":[{"plId":105,"detailId":1,"useTime":"1970-01-01 00:00:00","id":228,"useCount":2}],"userPeriodId":8,"useInterval":1,"dose":"","doseName":"0.5mg/粒","prescriptionIndex":{"doctorId":0,"patientId":5,"editType":2,"editTime":"2017-12-06 15:26:36","id":21},"rName":"","name":"","typeId":0,"id":105,"mName":"他克莫司胶囊（普乐可复）","useDesc":"","periodEnd":"2017-12-07 00:00:00"},{"plId":21,"prescriptionEditHistoryList":[],"typeName":"","mid":1,"useTypeId":"1","packages":"粒","periodBegin":"2017-12-04 14:01:10","prescriptionDoseDetail":[{"plId":103,"detailId":2,"useTime":"1970-01-01 00:00:00","id":191,"useCount":1},{"plId":103,"detailId":1,"useTime":"1970-01-01 00:00:00","id":190,"useCount":1}],"userPeriodId":8,"useInterval":1,"dose":"","doseName":"0.5mg/粒","prescriptionIndex":{"doctorId":0,"patientId":5,"editType":2,"editTime":"2017-12-06 15:26:36","id":21},"rName":"","name":"","typeId":0,"id":103,"mName":"他克莫司胶囊（普乐可复）","useDesc":"","periodEnd":"2017-12-07 00:00:00"}],"prescriptionEditHistroyList":[{"eidtMessage":"2017-12-06 14:01:33 编辑药品:他克莫司胶囊（普乐可复）,规格:0.5mg/粒","plId":21,"mid":1,"editTime":"2017-12-06 14:01:35","id":108},{"eidtMessage":"2017-12-06 新增药品盐酸莫西沙星注射液 （拜复乐） ,规格0.4g/瓶","plId":21,"mid":26,"editTime":"2017-12-06 14:04:15","id":109},{"eidtMessage":"2017-12-06 删除药品复方磺胺甲噁唑片（东北制药） ,规格0.4g/片","plId":21,"mid":32,"editTime":"2017-12-06 14:19:29","id":113},{"eidtMessage":"2017-12-06 新增药品乙胺丁醇 （上海信谊） ,规格0.25g/片","plId":21,"mid":120,"editTime":"2017-12-06 14:23:42","id":114},{"eidtMessage":"2017-12-06 删除药品乙胺丁醇 （上海信谊） ,规格0.25g/片","plId":21,"mid":120,"editTime":"2017-12-06 14:24:47","id":116},{"eidtMessage":"2017-12-06 15:26:34 编辑药品:他克莫司胶囊（普乐可复）,规格:0.5mg/粒","plId":21,"mid":1,"editTime":"2017-12-06 15:26:36","id":128}]}]
     */

    private String msgCode;
    private List<ListBean> list;

    public String getMsgCode() {
        return msgCode;
    }

    public void setMsgCode(String msgCode) {
        this.msgCode = msgCode;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean  implements Serializable{

        //药单创建时间
        public String getCreateTime(){
            String Time=null;
            if(perscriptDetailList!=null && perscriptDetailList.size()!=0){
                Time=perscriptDetailList.get(0).getPeriodBegin();
            }
            return  Time;
        }

        //药单创建时间
        public String getPrescriptionIndex(){
            String Time=null;
            if( perscriptDetailList!=null && perscriptDetailList.size()!=0){
                Time=perscriptDetailList.get(0).getPrescriptionIndex().getEditTime();
            }
            return  Time;
        }

        //药单创建名称
        public String getrName(){
            String doctor=null;
            if(perscriptDetailList!=null && perscriptDetailList.size()!=0){
                doctor=perscriptDetailList.get(0).getRName();
            }
            return  doctor;
        }

        public PerscriptDetailListBean getperscripDate(){
            PerscriptDetailListBean perscriptDetailListBean=null;
            if(perscriptDetailList!=null && perscriptDetailList.size()!=0){
                perscriptDetailListBean=perscriptDetailList.get(0);
            }
            return perscriptDetailListBean;
        }

        private List<PerscriptDetailListBean> perscriptDetailList;
        private List<PrescriptionEditHistroyListBean> prescriptionEditHistroyList;

        public List<PerscriptDetailListBean> getPerscriptDetailList() {
            return perscriptDetailList;
        }

        public void setPerscriptDetailList(List<PerscriptDetailListBean> perscriptDetailList) {
            this.perscriptDetailList = perscriptDetailList;
        }

        public List<PrescriptionEditHistroyListBean> getPrescriptionEditHistroyList() {
            return prescriptionEditHistroyList;
        }

        public void setPrescriptionEditHistroyList(List<PrescriptionEditHistroyListBean> prescriptionEditHistroyList) {
            this.prescriptionEditHistroyList = prescriptionEditHistroyList;
        }

        public static class PerscriptDetailListBean  implements Serializable{
            /**
             * plId : 21
             * prescriptionEditHistoryList : []
             * typeName :
             * mid : 14
             * useTypeId : 1
             * packages :
             * periodBegin : 2017-12-04 14:00:24
             * prescriptionDoseDetail : [{"plId":104,"detailId":1,"useTime":"1970-01-01 00:00:00","id":192,"useCount":1},{"plId":104,"detailId":2,"useTime":"1970-01-01 00:00:00","id":193,"useCount":1}]
             * userPeriodId : 1
             * useInterval : 1
             * dose :
             * doseName : 100mg/10ml
             * prescriptionIndex : {"doctorId":0,"patientId":5,"editType":2,"editTime":"2017-12-06 15:26:36","id":21}
             * rName :
             * name :
             * typeId : 0
             * id : 104
             * mName : 利妥昔单抗（美罗华）
             * useDesc :
             * periodEnd : 2017-12-05 00:00:00
             */

            private int plId;
            private String typeName;
            private int mid;
            private String useTypeId;
            private String packages;
            private String periodBegin;
            private int userPeriodId;
            private int useInterval;
            private String dose;
            private String doseName;
            private PrescriptionIndexBean prescriptionIndex;
            private String rName;
            private String timeLen;
            private String name;
            private int typeId;
            private int id;
            private String mName;
            private String useDesc;
            private String periodEnd;
            private List<?> prescriptionEditHistoryList;
            private List<PrescriptionDoseDetailBean> prescriptionDoseDetail;
            public String getTimeLen() {
                return timeLen;
            }
            public void setTimeLen(String timeLen) {
                this.timeLen = timeLen;
            }
            public int getPlId() {
                return plId;
            }

            public void setPlId(int plId) {
                this.plId = plId;
            }

            public String getTypeName() {
                return typeName;
            }

            public void setTypeName(String typeName) {
                this.typeName = typeName;
            }

            public int getMid() {
                return mid;
            }

            public void setMid(int mid) {
                this.mid = mid;
            }

            public String getUseTypeId() {
                return useTypeId;
            }

            public void setUseTypeId(String useTypeId) {
                this.useTypeId = useTypeId;
            }

            public String getPackages() {
                return packages;
            }

            public void setPackages(String packages) {
                this.packages = packages;
            }

            public String getPeriodBegin() {
                return periodBegin;
            }

            public void setPeriodBegin(String periodBegin) {
                this.periodBegin = periodBegin;
            }

            public int getUserPeriodId() {
                return userPeriodId;
            }

            public void setUserPeriodId(int userPeriodId) {
                this.userPeriodId = userPeriodId;
            }

            public int getUseInterval() {
                return useInterval;
            }

            public void setUseInterval(int useInterval) {
                this.useInterval = useInterval;
            }

            public String getDose() {
                return dose;
            }

            public void setDose(String dose) {
                this.dose = dose;
            }

            public String getDoseName() {
                return doseName;
            }

            public void setDoseName(String doseName) {
                this.doseName = doseName;
            }

            public PrescriptionIndexBean getPrescriptionIndex() {
                return prescriptionIndex;
            }

            public void setPrescriptionIndex(PrescriptionIndexBean prescriptionIndex) {
                this.prescriptionIndex = prescriptionIndex;
            }

            public String getRName() {
                return rName;
            }

            public void setRName(String rName) {
                this.rName = rName;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public int getTypeId() {
                return typeId;
            }

            public void setTypeId(int typeId) {
                this.typeId = typeId;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getMName() {
                return mName;
            }

            public void setMName(String mName) {
                this.mName = mName;
            }

            public String getUseDesc() {
                return useDesc;
            }

            public void setUseDesc(String useDesc) {
                this.useDesc = useDesc;
            }

            public String getPeriodEnd() {
                return periodEnd;
            }

            public void setPeriodEnd(String periodEnd) {
                this.periodEnd = periodEnd;
            }

            public List<?> getPrescriptionEditHistoryList() {
                return prescriptionEditHistoryList;
            }

            public void setPrescriptionEditHistoryList(List<?> prescriptionEditHistoryList) {
                this.prescriptionEditHistoryList = prescriptionEditHistoryList;
            }

            public List<PrescriptionDoseDetailBean> getPrescriptionDoseDetail() {
                return prescriptionDoseDetail;
            }

            public void setPrescriptionDoseDetail(List<PrescriptionDoseDetailBean> prescriptionDoseDetail) {
                this.prescriptionDoseDetail = prescriptionDoseDetail;
            }

            public static class PrescriptionIndexBean  implements Serializable{
                /**
                 * doctorId : 0
                 * patientId : 5
                 * editType : 2
                 * editTime : 2017-12-06 15:26:36
                 * id : 21
                 */

                private int doctorId;
                private int patientId;
                private int editType;
                private String editTime;
                private int id;

                public int getDoctorId() {
                    return doctorId;
                }

                public void setDoctorId(int doctorId) {
                    this.doctorId = doctorId;
                }

                public int getPatientId() {
                    return patientId;
                }

                public void setPatientId(int patientId) {
                    this.patientId = patientId;
                }

                public int getEditType() {
                    return editType;
                }

                public void setEditType(int editType) {
                    this.editType = editType;
                }

                public String getEditTime() {
                    return editTime;
                }

                public void setEditTime(String editTime) {
                    this.editTime = editTime;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }
            }

            public static class PrescriptionDoseDetailBean implements Serializable{
                /**
                 * plId : 104
                 * detailId : 1
                 * useTime : 1970-01-01 00:00:00
                 * id : 192
                 * useCount : 1
                 */

                private int plId;
                private int detailId;
                private String useTime;
                private int id;
                private Float useCount;

                public int getPlId() {
                    return plId;
                }

                public void setPlId(int plId) {
                    this.plId = plId;
                }

                public int getDetailId() {
                    return detailId;
                }

                public void setDetailId(int detailId) {
                    this.detailId = detailId;
                }

                public String getUseTime() {
                    return useTime;
                }

                public void setUseTime(String useTime) {
                    this.useTime = useTime;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public Float getUseCount() {
                    return useCount;
                }

                public void setUseCount(Float useCount) {
                    this.useCount = useCount;
                }
            }
        }

        public static class PrescriptionEditHistroyListBean  implements Serializable{
            /**
             * eidtMessage : 2017-12-06 14:01:33 编辑药品:他克莫司胶囊（普乐可复）,规格:0.5mg/粒
             * plId : 21
             * mid : 1
             * editTime : 2017-12-06 14:01:35
             * id : 108
             */

            private String eidtMessage;
            private int plId;
            private int mid;
            private String editTime;
            private int id;

            public String getEidtMessage() {
                return eidtMessage;
            }

            public void setEidtMessage(String eidtMessage) {
                this.eidtMessage = eidtMessage;
            }

            public int getPlId() {
                return plId;
            }

            public void setPlId(int plId) {
                this.plId = plId;
            }

            public int getMid() {
                return mid;
            }

            public void setMid(int mid) {
                this.mid = mid;
            }

            public String getEditTime() {
                return editTime;
            }

            public void setEditTime(String editTime) {
                this.editTime = editTime;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }
        }
    }
}
